package com.oceansoft.mobile.econsole.modules.weixin.config;

import com.oceansoft.mobile.econsole.weixin.api.*;
import com.oceansoft.mobile.econsole.weixin.api.config.ApiConfig;

public class WxFactory {
	public static final String TOKEN="ynga_token";
	public static final String APPID="wx399d16f9a4d016c1";
	public static final String AESKEY="";
	public static final String APPSECRET="6cdac0ea3df8a93b4a7a36ca0b747da5";
	public static final String HOST = "http://ynwx.yungov.cn/econsole/weixin";
	public static final String SYHOST = "http://ynwx.yungov.cn/econsole";
	public static final String DLYC = "http://ynwx.yungov.cn/econsole/weixin/bm/dlyc";
	public static final String MEMBER_OAUTH_URL = HOST + "/wx_member/index";
	public static final String PERCENTER_OAUTH_URL = HOST + "/percenter/index";
	public static final String CASECENTER_OAUTH_URL = SYHOST + "/api/case/caseCenter";
	public static final String DLYC_OAUTH_URL = HOST + "/bm/dlyc";
	public static final String CMCX = SYHOST+ "/weixinquery/gotoCmCx";


//	public static final String DIRECT_ONLINE = "http://weibo.com/320585007?from=feed&loc=nickname";
	
	private static ApiConfig config = null;
	
	public static synchronized ApiConfig getConfig(){
		if(config==null){
			config = new ApiConfig(APPID, APPSECRET,true);
		}
		return config;
	}
	
	public static MessageAPI buildMsgAPI(){
		return new MessageAPI(getConfig());
	}
	
	public static JsAPI buildJsAPI(){
		return new JsAPI(getConfig());
	}
	
	public static MenuAPI buildMenuAPI(){
		return new MenuAPI(getConfig());
	}
	
	public static OauthAPI buildOauthAPI(){
		return new OauthAPI(getConfig());
	}
	
	public static UserAPI buildUserAPI(){
		return new UserAPI(getConfig());
	}
}
